dopus request '"'getcatstr(20,'This is an archive in an archive.'lf||lf'Extract it to'lf"'%s'"lf'and then list it?',destpath)'"' getcatstr(21,'Extract|Cancel')
if ~rc then
call quitit
address command 'LZX e -m -a "'patch(LZXfile,0)'" "'destpath'" "'patch(LZXsubdir||selentry,1)'"'
if rc>0 then
call quitit(getcatstr(11,'Error while extracting from archive.'))
lister read desthandle '"'destpath'"' force
LZXfile=destpath||selentry
end
else
LZXfile=winpath||selentry
LZXdir=1
LZXsubdir=''
listLZX=1
end
lister select handle '"'selentry'"' off
lister refresh handle
if LZXdir then do
if cmd='BROWSE' then do
oldhandle=handle
/* The following makes lzxdir open it's own lister window. Uncomment to make it true */
/* lister new */
/* handle=result */
lister set handle title getcatstr(0,'LZXDir listed archive')
lister set handle title getcatstr(0,'LZXDir listed archive')
end
call showLZXdir
end
else
if cmd='BROWSE' then
command scandir new winpath
else do
if entries=0 then
winpath=''
command scandir winpath
end
return
dodelete:
askdelete=1
if LZXdir then do
if entries=0 then
call quitit
if notmove then do
lister set handle busy on
if askdelete then do
lister query handle numselfiles
nfiles=result
lister query handle numseldirs
ndirs=result
dopus request '"'getcatstr(5,'Warning: you cannot get back'lf'what you delete! OK to delete:'lf||lf'%s file(s) and'lf'%s drawer(s) (and their contents)?',nfiles,ndirs)'"' getcatstr(6,'Proceed|Cancel')
dopus request '"MAKEDIR not supported yet for LZXDir V1.1!'lf'Simply make an Directory (f.ex. in T:)'lf'and copy it into the LZX file..."' '"_fUCK yA!!!"'
/* dopus getstring '"'getcatstr(15,'Enter directory name or archive name.lzx')'" 31 ""' getcatstr(16,'OK|Cancel')
dirtomake=result
if dirtomake==''|dirtomake='RESULT' then
call quitit
now=date('i')*86400+time('s')
if LZXdir then do /* create empty dir in archive */
call createdirs(dirtomake'/')
address command 'cd T:LZXDir'handle'/'
address command 'LZX a -m -e -r "'patch(LZXfile,0)'" T:LZXDir'handle'/ T:LZXDir'handle'/#?'
if rc>0 then
topline=getcatstr(13,'Error while adding to archive.')
else do
lister add handle '"'dirtomake'" -1 1' now '----rwed'